#include<stdio.h>
#include<string.h>
#include<unistd.h>
const char* p="|/-\\";
char ch[102]={'\0'};

void pro(int temp)
{
    int len =strlen(p);
    printf("[%-100s][%d%%][%c]\r",ch,temp,p[temp%len]);
    fflush(stdout);
    ch[temp++]='=';
    if(temp<100)
    {
        ch[temp]='>';
    }
}


int main()
{
    int big=1000;
    int curr=0;
    while(curr<=big)
    {
        pro(curr*100/big);
        curr+=10;
        usleep(50000);
    }
    printf("\n");
    return 0;
}
